// Pin.h

#ifndef		PIN_H
#define		PIN_H

#include	<stdint.h>

#define		PIN_LOW		0
#define		PIN_HIGH	1
#define		PIN_OUTPUT	0
#define		PIN_INPUT	1

struct sPin{
	uint8_t pin;
	volatile uint16_t *port;
	volatile uint16_t *tris;
	volatile uint16_t *lat;
};

uint8_t	PinOpen( struct sPin *this, uint8_t dir, uint8_t value );
uint8_t	PinClose( struct sPin *this );
uint8_t	PinRead( struct sPin *this );
void 	PinWrite( struct sPin *this, uint8_t value );
void	PinDir( struct sPin *this, uint8_t dir );

#endif		//#ifndef		PIN_H
